PATH![]() |
![]() ![]() |
Retrieves event flags from a specified event group.
OSStatus MPWaitForEvent (
MPEventID event,
MPEventFlags *flags,
Duration timeout);
This function obtains event flags from the specified event group. The timeout specifies how long to wait for events if none are present when the call is made. If any flags are set when this function is called, all the flags in the event group are moved to the flag field and the event group is cleared. This obtaining and clearing action is an atomic operation to ensure that no updates are lost. If multiple tasks are waiting on an event group, only one can obtain any particular set of flags.
If you call this function from a cooperative task, you should specify only kDurationImmediate for the timeout length; other waits will cause the task to block.
The function MPSetEvent .